function showAdver(mode, position,delayTime,adverURL,adverImg) { // {mode, position,delayTime,adverURL,adverImg}
    // mode 定位的模式 (默认 static relative absolute fixed)
    // position => {left,right,top,bottom}   

    var timer = setTimeout(function () {

        var count = 10;

        var adver = document.createElement("div");
        adver.className = "adver";

        switch (mode) {
            case "static":
                adver.style.position = "static";
                if (position.left) {
                    adver.style.marginLeft = position.left + "px";
                }
                if (position.right) {
                    adver.style.marginRight = position.right + "px";
                }
                if (position.top) {
                    adver.style.marginTop = position.top + "px";
                }
                if (position.bottom) {
                    adver.style.marginBottom = position.top + "px";
                }
                break;
            case "relative":
            case "absolute":
            case "fixed":
                adver.style.position = mode;
                if (position.left) {
                    adver.style.left = position.left + "px";
                }
                if (position.right) {
                    adver.style.right = position.right + "px";
                }
                if (position.top) {
                    adver.style.top = position.top + "px";
                }
                if (position.bottom) {
                    adver.style.bottom = position.bottom + "px";
                }
                break;
        }



        // adverHeader
        var adverHeader = document.createElement("div");
        adverHeader.className = "adver-header";
        adver.appendChild(adverHeader);

        var adverTitle = document.createElement("div");
        adverTitle.className = "adver-title";
        adverTitle.textContent = `距离广告关闭还有${count}秒`;
        adverHeader.appendChild(adverTitle);

        var adverClose = document.createElement("div");
        adverClose.className = "adver-close";
        adverClose.textContent = `X`;
        adverHeader.appendChild(adverClose);

        adverClose.onclick = function () {
            clearTimeout(timer);
            clearInterval(timer1);
            adver.remove();
            showAdver(mode, position);
        }

        // adverMain
        var adverMain = document.createElement("div");
        adverMain.className = "adver-main";
        adver.appendChild(adverMain);


        var img = document.createElement("img");
        img.src = "../images/bzsc-dgbhz-300-250-7-5.gif";
        adverMain.appendChild(img);

        document.body.appendChild(adver);


        var timer1 = setInterval(function () {
            count--;
            adverTitle.innerText = `距离广告关闭还有${count}秒`;

            if (count == 0) {
                clearInterval(timer1);
                adver.remove();

                showAdver(mode, position);
            }
        }, 1000);




    }, 5000);
}
